home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / STRINGS.SWG / 0052_Convert REAL to STRING.pas < prev    next >
Pascal/Delphi Source File  |  1993-09-26  |  825b  |  24 lines

  1. {*****************************************************************************
  2.  * Function ...... RTOS()
  3.  * Purpose ....... To convert a REAL to a string
  4.  * Parameters .... nNum       REAL to convert to string format
  5.  *                 nLength    Length of resultant string
  6.  *                 nDec       Decimal places
  7.  * Returns ....... <nNum> as a string, <nLength> long to <nDec> decimal places
  8.  * Notes ......... None
  9.  * Author ........ Martin Richardson
  10.  * Date .......... May 13, 1992
  11.  *****************************************************************************}
  12. FUNCTION RTOS( nNum: REAL; nLength, nDec: INTEGER ): STRING;
  13. VAR
  14.    s: ^STRING;
  15. BEGIN
  16.      ASM  
  17.           mov     sp, bp 
  18.           push    ss
  19.           push    WORD PTR @RESULT
  20.      END;
  21.      STR( nNum:nLength:nDec, s^ );
  22. END;
  23.  
  24.